package fr.cephb.locustree.loaders;

import java.sql.ResultSet;
import java.sql.SQLException;



import fr.cephb.locustree.LTSqlLoader;


/**
 * 
 * AbstractLTSqlLoader
 *
 */
public abstract class AbstractLTSqlLoader
	extends AbstractLTLoader
	implements LTSqlLoader
	{
	
	protected AbstractLTSqlLoader()
		{
		
		}
	
	
	@Override
	public boolean next(ResultSet row) throws SQLException
		{
		if(row==null) return false;
		this.chromosome=null;
		this.mappedObject=null;
		this.keywords.clear();
		while(row.next())
			{
			++this.nLine;

			time("");
			if(make(row))
				{
				this.inserted++;
				return true;
				}
			}
		return false;
		}

	protected abstract boolean make(ResultSet row);
	
	
	
	
	
	}
